package by.admonko.universaltesting.datamodel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class Question {
	/*
	 * id integer NOT NULL DEFAULT nextval('test_question_id_seq'::regclass),
	 * test_id integer NOT NULL, quest_text character varying(2000), quest_media
	 * character varying(2000), hand_answer boolean, quet_time bigint,
	 */

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Test.class)
	private Test test;

	@Column
	private String questText;

	@Column
	private String questMedia;

	@Column
	private Boolean handAnswer;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Test getTest() {
		return test;
	}

	public void setTest(Test test) {
		this.test = test;
	}

	public String getQuestText() {
		return questText;
	}

	public void setQuestText(String questText) {
		this.questText = questText;
	}

	public String getQuestMedia() {
		return questMedia;
	}

	public void setQuestMedia(String questMedia) {
		this.questMedia = questMedia;
	}

	public Boolean getHandAnswer() {
		return handAnswer;
	}

	public void setHandAnswer(Boolean handAnswer) {
		this.handAnswer = handAnswer;
	}

	public Long getQuestTime() {
		return questTime;
	}

	public void setQuestTime(Long questTime) {
		this.questTime = questTime;
	}

	@Column
	private Long questTime;

}
